# 作者: 家里蹲 吴越洋
# 2023年02月26日15时28分10秒

class Animal:
    # 吃
    def eat(self):
        print("吃")

    def sleep(self):
        print("睡觉")

    def bark(self):
        print("叫了一声")

    def __fly(self):
        print("飞")

class Dog(Animal):
    def __init__(self,name):
        self.name=name

    def bark(self):
        print("汪汪叫")

    def run(self):
        print("跑")

    def eat(self):
        super().eat()
        print("狼吞虎咽")

class Person:
    def __init__(self,name):
        self.name=name

    def play_with_dog(self,dog:Dog):
        print(f"{self.name}和{dog.name}在愉快的玩耍")

if __name__=="__main__":
    wangcai=Dog("旺财")
    wangcai.run()
    wangcai.eat()
    wangcai.bark()
    # wangcai.fly() 无法访问
    print("*"*50)
    xiaotian=Person("小天")
    xiaotian.play_with_dog(wangcai)